﻿<Page x:Class="WpfTransform.PageMatrix"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
      xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
      mc:Ignorable="d" 
      d:DesignHeight="300" d:DesignWidth="800"
	Title="PageMatrix">

    <Page.Resources>
        <Style TargetType="TextBlock">
            <Setter Property="Width" Value="150" />
            <Setter Property="Height" Value="75" />
            <Setter Property="TextWrapping" Value="Wrap" />
            <Setter Property="TextAlignment" Value="Center" />
            <Setter Property="FontSize" Value="15" />
        </Style>
    </Page.Resources>
    <Canvas>
        <TextBlock Text=" "  Canvas.Left="50" Canvas.Top="50" Background="LightBlue"  />
        <TextBlock Text="Matrix M11 1.5  M121 M21 1 M22 2 OffsetX 20 OffsetY 10 "  Canvas.Left="50" Canvas.Top="50" 
                   Background="#7700ff00"  >
            <TextBlock.RenderTransform>
               <MatrixTransform>
                   <MatrixTransform.Matrix>
                       <Matrix M11="1" M12="0" M21="1" M22="1" OffsetX="20" OffsetY="10"  />
                   </MatrixTransform.Matrix>
               </MatrixTransform>
            </TextBlock.RenderTransform>
        </TextBlock>
    </Canvas>
</Page>
